﻿Imports BUS

Public Class frmDoiMatKhau

    Private Sub frmDoiMatKhau_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        Me.Close()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Close()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If txtMatKhauCu.Text <> frmDangNhap.pass Then
            MessageBox.Show("Mật khẩu cũ không đúng")
            Return
        End If
        If txtMatKhauMoi.Text <> txtNhapLaiMK.Text Then
            MessageBox.Show("Mật khẩu nhập lại không đúng")
            Return
        End If

        TaiKhoan_BUS.updateMatKhau(txtMatKhauMoi.Text)
        MessageBox.Show("Đổi mật khẩu thành công")

    End Sub
End Class